package com.robusta.cityuate.utils;


import android.annotation.SuppressLint;
import android.app.Activity;
import android.graphics.Point;
import android.view.Display;

public class UIUtils {

	
	
	@SuppressLint("NewApi")
	public static int getScreenWidth(Activity activity){
		Display display = activity.getWindowManager().getDefaultDisplay();
		Point size = new Point();

		int width = 0;
		int currentapiVersion = android.os.Build.VERSION.SDK_INT;
		if (currentapiVersion >= android.os.Build.VERSION_CODES.HONEYCOMB_MR2) {
			display.getSize(size);
			width = size.x;

		} else {
			width = display.getWidth();
		}
		return width;
	}
}
